#include<stdio.h>

int main()
{
	int n = 0;
	//int* p = NULL;    //操作空指针会报 segmentation fault 错误。
	
	int* p = &n;    
	printf("%p\n",p);
	
	*p = 100;          //通过间接运算符可以修改指针变量指向的内存地址存放的值，内存地址本身不变
	printf("%p\n",p);
	printf("%d\n",n);

	int m = 200;
	p = &m;            //修改指针变量的指向，指向的内存地址值发生改变
	printf("%p\n",p);
	printf("%d\n",*p);

	return 0;
}
